package com.itljm.cxrMarket.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itljm.cxrMarket.entity.Merchants;
import com.baomidou.mybatisplus.extension.service.IService;
import com.itljm.cxrMarket.entity.Products;

import java.util.List;

public interface MerchantsService extends IService<Merchants> {
    // 分页查询商户信息
    List<Merchants> selectMerchantByPage(Page<Products> page, Wrapper<Products> entityWrapper);

    // 根据商户ID查询商户信息
    Merchants selectMerchantById(Integer merchantId);

    // 根据商户名称查询商户信息
    List<Merchants> selectMerchantByName(String merchantName);

    // 新增或修改商户信息
    boolean saveOrUpdateMerchant(Merchants merchant);

    Integer selectMerchantIdByUserId(String userId);

    Merchants selectMerchantByUserId(Long userId);

    boolean checkMerchantStatusById(Integer merchantId, Integer checkStatus, String checkReason);
}
